php forum
php mysql forum
php mysql smarty
 
Topic Options
#318585 - 05/24/10 04:06 PM [7.x] Headerless CustomIslands
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Name: UBB.Headerless CustomIslands

Author: Gizmo (James of VNC Web Design)

Requirements: UBB.Threads 7.x (not compatible with UBB.Threads 6.x or below)

Current Version: v0.1

About:
If you've visited any of my client sites you'll see Custom Islands holding data placed around the forums without requiring editing of data outside of the Custom Islands (at least after modifying where you want to have the Custom Islands displayed).

Demo: I don't currently have a demo available.

Install Instructions:
You'll want to first go to "Portal Layout" area of the Control Panel and select the "External Use" link for the island you wish to use; really here all we need is 3 lines that show the "path" to files (here it's the /var/www/mysite.tld lines) for the Custom Island that we're going to be using (all code is displayed below), for this example we're going to be using the Custom Island #8.

PHP Code (For header/footer includes)
Code:
<div class="vnc_ads">
<?php
if (!defined('UBB_MAIN_PROGRAM')) define('UBB_MAIN_PROGRAM',1);
$style_side="";$tbopen="";$tbclose="";
echo("<table width=\"100%\">");
include("/var/www/mysite.tld/forum/languages/english/portal_islands.php");
include("/var/www/mysite.tld/forum/languages/english/generic.php");
include("/var/www/mysite.tld/forum/cache/portal_box_8.php");
echo("</table>");
?>
</div>


Smarty Code (for use inside of template files)
Code:
<div class="vnc_ads" align="center">
{php}
if (!defined('UBB_MAIN_PROGRAM')) define('UBB_MAIN_PROGRAM',1);
$style_side="";$tbopen="";$tbclose="";
echo("<table>");
include("/var/www/mysite.tld/forum/languages/english/portal_islands.php");
include("/var/www/mysite.tld/forum/languages/english/generic.php");
include("/var/www/mysite.tld/forum/cache/portal_box_8.php");
echo("</table>");
{/php}
</div>


New Style Code (Insert at "Extra Properties")
Code:
.vnc_ads .tdheader {
	display: none;
}
.vnc_ads .alt-1 {
	background-color: #CCCCCC;
}


In the above "Code" sections (PHP or Smarty) you'll see:
Code:
$style_side="";$tbopen="";$tbclose="";


These are:
$style_side=""; - Additional Style Data, Left Side of current style definitions.
$tbopen=""; - Just after table open.
$tbclose=""; - Just before table close.

You'll likely never need to change these; they are a part of the default syntax for the external use island in the UBB.

In the Style Code you'll see that we've added "vnc_ads", this is so we can change tdheader and alt-1 without having to modify any base code (it could just as easily be "my_ads" or anything other than what's being used by the base code of the UBB). The modified tdheader just hides the headerbar. The modified alt-1 just sets a background color.

What you'll do now is either edit a template and place the Smarty Code in the file at the approximate location you'd want it (say showflat.tpl above the quickreply box) and then save the template then clear your cache and your newly placed custom island is ready to go.

In our code above we've assumed you want the island centered where you place it, otherwise just remove the ' align="center"' from the "div" tag in the code. You can also add ' width="100%"' to the "table" tag above if you want it to display the full width of the area you're placing it in.

Pricing: Free
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks